package com.undsf.despot.modles;

import java.util.ArrayList;
import java.util.List;

/**
 * Created by Arathi on 2016/10/3.
 */
public class Team {
    public List<Unit> units;

    public Force force;

    public Team() {
        units = new ArrayList<Unit>();
    }

    public boolean add(Unit u) {
        u.team = this;
        units.add(u);
        return true;
    }

    public List<Command> selectCommands() {
        List<Command> tCommands = new ArrayList<Command>();
        for (Unit u : units) {
            Command uCommand = u.selectCommand();
            tCommands.add(uCommand);
        }
        return tCommands;
    }
}
